Optimal. Leaf size=72 \[ -\frac{(3 a-b) (a+b) \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{2 a^{3/2} b^{5/2}}+\frac{(a+b)^2 \sin (x)}{2 a b^2 \left (a+b \sin ^2(x)\right )}+\frac{\sin (x)}{b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.118633, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {3190, 390, 385, 205} \[ -\frac{(3 a-b) (a+b) \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{2 a^{3/2} b^{5/2}}+\frac{(a+b)^2 \sin (x)}{2 a b^2 \left (a+b \sin ^2(x)\right )}+\frac{\sin (x)}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3190
Rule 390
Rule 385
Rule 205
Rubi steps
\begin{align*} \int \frac{\cos ^5(x)}{\left (a+b \sin ^2(x)\right )^2} \, dx &=\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^2}{\left (a+b x^2\right )^2} \, dx,x,\sin (x)\right )\\ &=\operatorname{Subst}\left (\int \left (\frac{1}{b^2}-\frac{a^2-b^2+2 b (a+b) x^2}{b^2 \left (a+b x^2\right )^2}\right ) \, dx,x,\sin (x)\right )\\ &=\frac{\sin (x)}{b^2}-\frac{\operatorname{Subst}\left (\int \frac{a^2-b^2+2 b (a+b) x^2}{\left (a+b x^2\right )^2} \, dx,x,\sin (x)\right )}{b^2}\\ &=\frac{\sin (x)}{b^2}+\frac{(a+b)^2 \sin (x)}{2 a b^2 \left (a+b \sin ^2(x)\right )}-\frac{((3 a-b) (a+b)) \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\sin (x)\right )}{2 a b^2}\\ &=-\frac{(3 a-b) (a+b) \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{2 a^{3/2} b^{5/2}}+\frac{\sin (x)}{b^2}+\frac{(a+b)^2 \sin (x)}{2 a b^2 \left (a+b \sin ^2(x)\right )}\\ \end{align*}
Mathematica [A] time = 0.328314, size = 118, normalized size = 1.64 \[ \frac{\frac{\left (-3 a^2-2 a b+b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{a^{3/2}}+\frac{\left (3 a^2+2 a b-b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a} \csc (x)}{\sqrt{b}}\right )}{a^{3/2}}+\frac{4 \sqrt{b} (a+b)^2 \sin (x)}{a (2 a-b \cos (2 x)+b)}+4 \sqrt{b} \sin (x)}{4 b^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.05, size = 120, normalized size = 1.7 \begin{align*}{\frac{\sin \left ( x \right ) }{{b}^{2}}}+{\frac{a\sin \left ( x \right ) }{2\,{b}^{2} \left ( a+b \left ( \sin \left ( x \right ) \right ) ^{2} \right ) }}+{\frac{\sin \left ( x \right ) }{b \left ( a+b \left ( \sin \left ( x \right ) \right ) ^{2} \right ) }}+{\frac{\sin \left ( x \right ) }{2\,a \left ( a+b \left ( \sin \left ( x \right ) \right ) ^{2} \right ) }}-{\frac{3\,a}{2\,{b}^{2}}\arctan \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{1}{b}\arctan \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{1}{2\,a}\arctan \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.12144, size = 641, normalized size = 8.9 \begin{align*} \left [-\frac{{\left (3 \, a^{3} + 5 \, a^{2} b + a b^{2} - b^{3} -{\left (3 \, a^{2} b + 2 \, a b^{2} - b^{3}\right )} \cos \left (x\right )^{2}\right )} \sqrt{-a b} \log \left (-\frac{b \cos \left (x\right )^{2} + 2 \, \sqrt{-a b} \sin \left (x\right ) + a - b}{b \cos \left (x\right )^{2} - a - b}\right ) - 2 \,{\left (2 \, a^{2} b^{2} \cos \left (x\right )^{2} - 3 \, a^{3} b - 4 \, a^{2} b^{2} - a b^{3}\right )} \sin \left (x\right )}{4 \,{\left (a^{2} b^{4} \cos \left (x\right )^{2} - a^{3} b^{3} - a^{2} b^{4}\right )}}, \frac{{\left (3 \, a^{3} + 5 \, a^{2} b + a b^{2} - b^{3} -{\left (3 \, a^{2} b + 2 \, a b^{2} - b^{3}\right )} \cos \left (x\right )^{2}\right )} \sqrt{a b} \arctan \left (\frac{\sqrt{a b} \sin \left (x\right )}{a}\right ) +{\left (2 \, a^{2} b^{2} \cos \left (x\right )^{2} - 3 \, a^{3} b - 4 \, a^{2} b^{2} - a b^{3}\right )} \sin \left (x\right )}{2 \,{\left (a^{2} b^{4} \cos \left (x\right )^{2} - a^{3} b^{3} - a^{2} b^{4}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12598, size = 111, normalized size = 1.54 \begin{align*} \frac{\sin \left (x\right )}{b^{2}} - \frac{{\left (3 \, a^{2} + 2 \, a b - b^{2}\right )} \arctan \left (\frac{b \sin \left (x\right )}{\sqrt{a b}}\right )}{2 \, \sqrt{a b} a b^{2}} + \frac{a^{2} \sin \left (x\right ) + 2 \, a b \sin \left (x\right ) + b^{2} \sin \left (x\right )}{2 \,{\left (b \sin \left (x\right )^{2} + a\right )} a b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]